package leetcode.editor.intel;

import org.springframework.amqp.core.MessagePostProcessor;

public interface MQProducer {
    /**
     * Convert a Java object to an Amqp Message and send it to a default exchange with a default routing key.
     *
     * @param message
     */
    public void sendDataToRabbitMQ(Object message);

    /**
     * Convert a Java object to an Amqp Message and send it to a default exchange with a default routing key.
     *
     * @param message
     * @param messagePostProcessor
     */
    public void sendDataToRabbitMQ(Object message, MessagePostProcessor messagePostProcessor);

    /**
     * 发送消息到指定的队列中
     * Convert a Java object to an Amqp Message and send it to a default exchange with a specific routing key.
     *
     * @param routingKey
     * @param message
     */
    public void sendDataToRabbitMQ(String routingKey, Object message);

    /**
     * Convert a Java object to an Amqp Message and send it to a default exchange with a specific routing key
     *
     * @param routingKey
     * @param message
     * @param messagePostProcessor
     */
    public void sendDataToRabbitMQ(String routingKey, Object message, MessagePostProcessor messagePostProcessor);

    /**
     * Convert a Java object to an Amqp Message and send it to a specific exchange with a specific routing key.
     *
     * @param exchange
     * @param routingKey
     * @param message
     */
    public void sendDataToRabbitMQ(String exchange, String routingKey, Object message);

    /**
     * Convert a Java object to an Amqp Message and send it to a specific exchange with a specific routing key.
     *
     * @param exchange
     * @param routingKey
     * @param message
     * @param messagePostProcessor
     */
    public void sendDataToRabbitMQ(String exchange, String routingKey, Object message, MessagePostProcessor messagePostProcessor);
}
